x86/EFI: fix freeing of uninitialized pointer
authorRoy Franz <roy.franz@linaro.org>
Wed, 24 Sep 2014 09:09:11 +0000 (11:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 24 Sep 2014 09:09:11 +0000 (11:09 +0200)
commitc61690fb76f9a51a8c932d76929b67bd0940febe
tree62bae77c82fbf01a5437236de813f730be45d91d
parent7110ab4b66ac3388259fec93be90aa2d900d58b6
x86/EFI: fix freeing of uninitialized pointer

The only valid response from the LocateHandle() call is EFI_BUFFER_TOO_SMALL,
so exit if we get anything else.  We pass a 0 size/NULL pointer buffer, so the
only other returns we will get is an error.  Return right away as there is
nothing to do.  Also return if there is an error allocating the buffer, as the
previous code path also allowed for an undefined pointer to be freed.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Re-structure the change.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/efi/boot.c